added flicker prevention + config option