Fix oo-admin-clear-pending-ops script

Bug fixes