Fixed all errors but still something wrong with saving resources and buildings