Fixed up utility functions for evaluation.