Fixed some compillation errors