fix get query in ditto