Major performance fix in instantiation.