fixed bug in add_derivate