Bring over a couple little things from master...
Merge pull request #1051 from MrJoy/patches_from_master

Bring over a couple little things from master...