fixed missed and empty condtion cases