Fixed several warnings from -Wall.