Fixes #272 Search SQL Error