Fixed bug that gave incorrect results for multi-word search terms; several stability fixes