Fixed compilation errors in debug mode