fixes #2838 Saving twice in the language manager throws javascript error