A couple of bugfixes and additional logs.