Sheffield, the runaway league leaders, deserved the win but were made to work for it by an energetic Chesterfield team.