Ugly hack to make serialization of responses work