more logging and a fix