Some bugfixes for sqlalchemy-migrate