Defence from segfault when running unit testing.