fix error on closing with existing order