FIX: Python3 transactions and sqlalchemy conflict

When used together with transaction and sqlalchemy,
it results in TypeErrorTypeError: unorderable types: int() < str().
SQLAlchemy uses string as sortKey while this uses int as sortKey
and these just does not work together in python3.