-Removed unnecessary code in poll()