error fixes in history.models and products.models