I noticed that the resource icons disappear from the top bar when the amount of the resource is zero; so if at any point during the game I have zero mana, or zero crystals, the icon for that resource is removed.
Besides being a somewhat annoying mis-feature (when I suddenly don't see my mana at a glance, I start looking around for it, and it takes me a minute to realise that it must be at zero - an obvious "0" in the top bar would be better), perhaps this shuffling of the resource icons is what is causing them to end up out of alignment?