errors switch fix