Fix bug javascript with filemanager