add some asserts for derivatives,

see issue #10