VID-867 closing the WMU when an error occurs