if condition fixed