fixed errors introduced by -Werror option