fixed -Wall warnings