type cast fixes