Fix casting
remove unnecessary dependency