fixed conditonal not being properly defined