Fix setuphandlers to not crash if widgets is available, but profile is not configured (e.g. in some tests)
PEP8 (just newlines)