Good catch. I think this can fix it https://gist.github.com/umpirsky/7bce762a0e8858a22aa4

It is just quantity that need to take care of, all items are going to on-hold anyway.