fix bugs of roleCast