bugfix of stock migration