On krull-schmidt and a problem of matlis