some indent corrections
filter invalid utf8 bytes, may have sideeffects