Corrected calculation of staff-context