Fixing gcc problems