fix error introduced when fixing warnings due to -Wswitch