Fixed clascastexception caused by copy paste