bug fixing for updating Orders