fix wrong result in case clause
add a test for causality using orset