minor tweaks mostly to make gcc happy