gcc compile errors fixed