Amend if statement priority