model - more debug and a fix attempt