fixing a regression in json responses, no self argument outside of a class