fix error message, in wrong if-else block