fix various command line options (WIP!) + sync with develop