Removed duplicate condition check