Rowtree bugged me to commit this for him.
Merge pull request #2623 from SkyMarshal/bugfixes

Rowtree bugged me to commit this for him.