Fixed compilation problems with gcc -Wall