get__ function not working due to problem in typecasting.