Fixed some bugs with internal share processing