Fix wrong type of class instantiation.