Fix if/else close