Text filter bugfixes.
Merge pull request #9 from rhyolight/bugfix

Text filter bugfixes.