Poller fixes

Fixed a NPE in poll_mask, and fixed logic bugs relating to null existing in the poll items array.