Some fix to if and while