merge from danquist

This has the bug fixes that are live on Civcraft as of here: https://groups.google.com/d/msg/civcraftdevelopers/KfCcilDtqbk/WyI6NuZslg0J