Fixed some issues preventing compilation