fixed horner bug