fixing class error