Removed unnecessary if block