correct racial distribution calculations.
added safety at end of turn
fix the "aliens opening doors" bug.