fixed bug in while and if condition

didn't work with non truth values