(Hopefully) fixed if conditions