use old query when not editing (fixes trying to load a non-existant resources)