Fix nested list JS code execution