Fixed problem with special characters in JS