fixed the rest of the api
fixed so it can run on azure again