Changed the if to a more logical statement.
Thank you - @jonursenbach