The if statement seemed weird.
I think this makes more sense and fixes it.