Fixed some issues with the fast sensitivity analysis code