Fixed some bugs in postflight script

Also fixed two bugs in install-check tests for correlation and logistic