fixed condition checking