Fixed some errors preventing compilation