Cleanup and removing some debug output
fixing readyness issue with an ugly hack
fixes #707