Fixing gcc issues