Bugfixing, added more logging to do so