Clean up casting.