fixed some IFs