Fixes Alex's crappy search code... sort of