fix when then statement is empty