fix some issues but cannot figure out the http thing