Small fixes

Three small tweaks from my pg-ranges branch, mainly to try out a pull request from github into sqlalchemy.