fixed condition issues