Some more cast fixes