Fixed code for adding treasures