fix bug that causes crash with empty input on createpoll