Fix plugin js bug