attempting to fix.  sorry this isn't in another branch, will tidy up tomorrow