fixed while and if