Merge pull request #1056 from dorkster/fixes

Small fixes