Last commit was a bit rubbish - this should fix the issues I introduced