Miscellaneous fixes
Merge branch 'master' into graphics