Fix logic here to be a bit easier to read.