Fixes issue with close