fixing envelope and bag relations