fixed bug with ill-formed instances