Fix bug of 'if/else'