Added support for automatically stripping null characters