Bug fixes and enhancements to question answering algorithm