fix javascript fading