Oh dear I left debug code in. Commented out!