Fixes issue where search command returns error.