fix blown pointer when string is null