Tweaked if statements