Fixed some debug messages, should be more stable now