fixing gcc errors