fixed bugs and warnings
Merge pull request #31 from bjorges/master

fixed bugs and warnings