added root type enforcing - cloe #714