Added (some) debug, fixed #148.