fixed a memory issue in printToAStr function. Now everything is stable in the release build