A bug in the game.
Some thing just happend to me idk if this is happening to every one. I had 7 resource potion with me. Then I got 1 more from the treasure box but in my temporary storage their ware 3 and now I had 5 in my townhall.so any magic you had stacked before goes to the temporary storage if we get that item again.