Bugfix on initialization of jacobian matrix