fixed some gcc complains