cast bug fixed