Fixed some http bugs