Changed code to use upgraded Flask version.