fixed bugs in evaluation