fixed problem with apply command using object database instead of stagin...

...g database