Fixes a bug so it works with search controllers.