Removed unnecessary check and added test for failure.