fixed wrong cast syntax