Removed unneeded duplicate code.