Fixed issue of casting transitions.