turned on -Werror, fixed errors