[BUGFIX] RTE: JS errors on unload