Fix removing of resources for shares
Update handling of exeptions in cleanup for shares