Fix inventory check in works search