Fixed broken api endpoints