issue #5685: fix FadeIn & FadeOut bugs