fix SyntaxError because continue should be inside one loop