initial fix of getSale and getItem middleware