Fixed C99 compile warnings