-a couple of fixes to get the whole code to compile under gcc linux