Bug fix (end-string)

End string fix
--

The end string was not correctly calculated, that's fixed now.