fix errors and deprecation warnings
Merge pull request #2 from Mouq/master

fix errors and deprecation warnings