flask api core fix