FIX: fix bug in Newton