misceallenous

- stepMax2 ==> stepMax
- added an ERROR positivity condition
- fixed bug about max of correlation
- added ERROR message for maximum of correlation