fixing gcc -Wall warnings