fix the web api. Works properly now.