Fixed condition checking