fixed missing condition