Fixes faults in HttpApi; Fixes #1