fix data loss bug with listObject and move callback to end event handler