Search functionality works now.
Fixed a NPE.