Fixing runtime errors in economy