bugfix of delete last key