http fixes after refactoring