fixed #3877. make fadeIn and fadeOut behaviours correct