fix conditional statements