moved clear() out of the config loop in constructor