[FIX] stock: fixes of bug introduced in previous branch merge