fixed some error with command line param handling.
Merge remote branch 'origin/master'