England still on the up despite last Test defeat - Jonathan Agnew

England celebrate
England have lost only one of their past six Test series

It was desperately disappointing to see England fall in such a heap on the final day of the fourth Test against South Africa.

Captain Alastair Cook was determined not to have a repeat of the Ashes, when they were thrashed in the final match at The Oval after winning the series, but it happened again.

Is it difficult to raise yourself for a match when the series is already won? Maybe now, in an era of so much Test cricket - England have played 17 matches since last April - it is. It might not have happened as much in the past, when there were fewer Tests and each one felt like more of an event.

But there was just something about the England body language that suggested they were almost in end-of-term mode. I watched with Mark Boucher, the former South Africa wicketkeeper and my Test Match Special colleague, as they walked up the steps after their warm-up, and we both thought they didn't look up for it.

And so it proved as, once they lost a couple of wickets, England collectively fell on their swords. To be bowled out for 101, to lose seven wickets for 43 runs and to survive for only 82 balls on the final morning bordered on unprofessional.

Media playback is not supported on this device

'Limp' performance frustrates Cook

It shows just how much England have to work on. They have not been at their best throughout this Test and, when they find themselves in a similar situation in the future, they must not let this happen again.

However, we do have to take the context of the series as a whole and, therefore, this has been a successful Test tour for Cook's side.

It is a continuation of the upward curve they have been on from the beginning of last summer.

If you think of the gloom that surrounded the England team after the tour of the West Indies, it is a dramatic turnaround. A new coach, winning the Ashes, and now a victory away to a side that began the series number one in the world.

Certain individuals in the team have improved so much in less than a year.

Ben Stokes has gone from the man given a saluted send-off by Marlon Samuels to a world-class all-rounder.

Joe Root has progressed to one of the best batsmen in the world and Stuart Broad is ranked as the best bowler in Test cricket. Broad has even usurped James Anderson as England's most dangerous weapon and should now be seen as the leader of the attack.

England all-rounder Ben Stokes
Stokes was England's leading run-scorer in the series with 411 at an average of 58 and also took 12 wickets

There's also been a huge change for Cook. From the end of 2013, right up to the Ashes of 2015, there were constant questions about his captaincy and even his place in the side.

Now, he looks like a leader. When you watch the way he carries himself, how he moves the field and manages his bowlers, it's hard to remember why those questions existed.

Has England's improvement simply been down to the change of coaching staff? That's a hard question to answer because, even now, we're not exactly sure what Trevor Bayliss does.

He stays in the background, without saying a great deal. He leaves the leadership to Cook. That in itself is probably his greatest benefit to this England team, who did not perform well under the hands-on, vocal Peter Moores.

And Paul Farbrace, the assistant coach, deserves a big pat on the back. It was when he was in caretaker charge against New Zealand last summer that England began to turn things around both on the pitch and in terms of attitude.

England bowler Stuart Broad
Broad was England's leading wicket-taker in the series with 18 at a cost of 20.61 apiece

Cook, Bayliss and Farbrace will probably be disappointed the problems England had before this series still remain, specifically the batting spots of two, three and five.

By the time Sri Lanka arrive for the first Test at Headingley in May, England will have to decide on an opening batsman but, as the time since Andrew Strauss retired in 2012 has proved, it is a tough decision.

The general view is that Alex Hales' technique means he will fail more often than he succeeds in Test cricket. He has averaged only 17 during the series and shown a vulnerability outside off stump we suspected he would.

Hales could go away and work on his technique, but it is one that has served him well in limited-overs cricket, where he has been a success for England. Where the selectors have got themselves into a muddle is thinking those white-ball runs could also come in Test cricket.

Hales, though, is not the only one to fail to cement his place. Nick Compton and James Taylor both missed out on fully grasping the opportunity given to them and, for that reason, the early part of the new County Championship season will be important for lots of batsmen.

England batsman Joe Root
Root scored 386 runs in the series at an average of 55.14

Taylor, Compton and Hales will all need runs, but the likes of Ian Bell, Gary Ballance and Hampshire's James Vince will feel like they have a chance too. Men in form should be chosen, because that's what Championship cricket is about.

Other areas for England to work on during the summer against Sri Lanka and Pakistan are their catching, which was very disappointing here, and the glovework of Jonny Bairstow. It's fantastic he has started to look at home with the bat, but wicketkeepers will also always be judged on wicketkeeping.

England are now on the best part of a two-year run to the next Ashes, but before then their next overseas assignments will be in the alien conditions of Bangladesh and India.

India will be a hard tour, with England needing both quality spinners and batsmen who can play spin bowling.

Though the result there will have little relevance to the trip down under in 2017-18, we want England to compete on the subcontinent.

Jonathan Agnew was talking to BBC Sport's Stephan Shemilt