Fix inventory reading