fixed minor issue with condition checking