Move checks to inside if statement.