fix classcast issue