corrected if condition error