stream ajax api, fix bugs