Correct some warnings and compile problems
Merge pull request #4 from msg7086/master

Correct some warnings and compile problems