fixed cast collapse