fix effect and addClass method