bug fixes for http