Solve bugs of the change from select to poll