further changes to flask integration