work around jsonify and sqlalchemy issues