Fixed bug when updating products gives an incorrect code.