Type casting fixed, so compiler does not complain now