fix redefine class problem