Fixed crossrule function