fixed warnings with -Wall