Removed unneeded redundant if statements