Fixed compilation and warning