fixed product save and added json errors