toggling error class