HTTP function throwing error 500.

fixed now