fixed issue with single characters causing seg fault