added check for overdeterminedness. Passes R CMD check.