fixed leave issue