fixed a town resource allocation bug