fix model global variables