fix a rendering bug; attempt at documenting in more detai.