fix some gcc compilation issues. warning free now too