fixed a bug with the delete key