fix conditional statement