fixed a memory issue with safe strings