took care of highlighting errors when user backspaces indefinitely