fix bugs due to switch to canonical format. all good now we hope