fixed some errors
Merge pull request #1 from linjan/master

Fix to work with 6.2.2