tweaks, and fixed a segfault bug in http_server