Fix bug where planet populations could run off the edge of the screen