some fixes to make -pedantic happy