fix various warnings
Merge pull request #212 from byronyi/warning

fix various warnings