Clean up of bags and compiled elements after fork