fixing -Wall warnings