[FIX] stock: backport of rev 0a6d63b