Fixed warnings in model test. use of global variables