Fixed compilation errors