Minor bug fixes; NOTE: does not work well with non-english words