add guards to tests.c as well