fixed the "500000" bug.

added logs.