added rex_vars declaration to rex.c, not sure if it affects the sim crashing bug