fix if/else case