typecasting issue, now included in comment