Fixing gcc bug