fixed problem with it freezing up

I fixed the problem with it freezing up, but now it won't update the ui
properly at the end of a turn, so i need to look at it more to see
wtf.... i put a big comment where i'm working, if you want to see if you
can figure it out, please do!