Fixed minor bug, more debug output