Made compiler happy, fixing some typos and silly errors