Fixed js behavior on toggle click