Fixed some gcc detected build errors