fixed a bug in user_derivatives