fixed cast activity bug