fix the give js bug