Improved delete key behaviour