Fixed search(), which threw a NullPointerException.