Fixed bug in evaluate method.