Minor compatibility fixes
Merge pull request #918 from igorko/master

Minor compatibility fixes