fixing class instantiation failure