fixed warnings from gcc with -Wall