BUG :ERROR  in main for(.....) chaged to if (....)
minor corrections
Merge branch 'next' into windows
Minor changes