Fix nil pointer. Cleanup debugging puts