Fix bug 3147, error in computing answer