some bug fixes for word_proximity