fixbugs in stockcountsbackend