Fix the bug with last typed symbol