Fixed issues
Fixed dist_p and max_pre1 directory issue: