[Kwant] Memory error while using tkwant