Fix illegal argument and Add supporting xhr-polling