fix for shares cleanup