wrong cast fixed