fix infinite loop in find.
fix whitespace.