added a try/except guard in poll(), sometimes causing exception