Changes to delay the key erasebut actually do it

fixed #6
fixed #17