Fixed params crash in tests.cpp