Fix flask routes