fix warnings due to -Wswitch