Fixed memory leak when leaderboard/achievements opened multiple times.

Reviewer: @aogilvie