fixed crash because of incorrect string releasing
Merge remote-tracking branch 'dmitry/fixes'