Fix leave issue