Fixed the evaluate function.