Fixed bug in measuring accuracy