Fixed compilation warnings
Fixed mode