Fix esil last char bug