Fixes incorrectly implemented TEST_MODE flag issue