Fixed ifs
Fixed merge conflicts