Fixing the unescape section eating an extra character

Fixing the unescape section eating an extra character after the last ].