fix test and work around require-free build issue