simplifyIfs porting error fixes