Removed some duplicate conditions