fixes prompt save tab on closing