Move app.set to compensate for error 'can't call .set on undefined'