Storing the pending_op id to retrieve it after a reload
Fixing mongo query to pass correct parameters