fixed a bug about discarding points