Fixed compatibiity issue with sqlalchemy 0.8.3.