small fixes to make gcc happy