little more debug and a fix