two bug fixes
Merge branch 'master' into develop