fix poll functions