Fixed some redundant code.