Fix tests, use a test flag in script (don't like it).