Fixed search to return referenced data