try to make the codemirror refresh when the scratch activecode is opened more robust/reliable