fix switch-case warnings