fix crash for non char data