Fixed occurence of multiple MenuItems on closing the panel

When the panel was closed, an extra MenuItem was added for adding a group of friends. When the panel was closed and it was slid and closed again(without opening it), same MenuItem was added again. If we went on doing the sliding and closing without opening the panel, the number of MenuItem was increasing by one. This pull request fixes that problem.