Fixed instantiation bug