inventory lookup type error fix