fixed error in condition