Added logic for fixing inventory status
Fixes after tests