Fixed Leave calculations

Fixed Leave calculations