making backspace behave as expected