Fix bug leave