Some fixes - not quite there yet though as need to agree with values from code 2 commits ago