fixed missing "else"