fix issue #1, more robust accuracy computation.