Fix bug, delete doesn't delete variables