added delete statement on resouceviewer after a tab is closed