fixed small typecasting