Fix undefined variable on APC test