fix class field cast error  bug