fixed "NotImplemented" exception due to changes in SQLAlchemy