fix error on if test