Fixing Flask errors.