Duplicate line removed

Removed double if statement.