Added if-clause for derivative calculations. Use PentaneTester.mo to see differences in numerical derivatives...