Added 2 missing if statements