bug fix in polynomial and derivative defintions