fix pre without class error