bug fix switch