Fix bug that caused share menu not to work