Fixed public JS bug