fix poll() to spec and size()