Yet another Shell closing fix