Fixed compile bugs
IT COMPILES\!\!\!\! AND ONLY 1 WARNING \!\!\!