fixed js bug in points updating