Fix CMD application

Fixes erasekey function and corrects the eraseall syntax