cast fixes