javascript bugfixes in episode refresh