fix Error on if matching