bug ProductTaken not saved and refactoring