Oh dear I left debug code in. Commented out!
Removed debug code