fixed #1489 -- made checkReplace error-first, added missing callback, added missing object field to db query