fixed flicker bug for module templates