flask fix api methods initialize