Bug fixes

Some bugs related to the code that controlled the number of minerals in
game.