Revert changes to SearchMiddleWare