Fixed two small leaks added in the previous commit