Bug fixes in share controller