fixed correctness of cause stack