Fixed Wrong cast

Wrong Cast now entirely fixed