Fixed premature end of string
Improved stability