Removed an unnecessary condition and fixed a typo.