some options fixes and some preparation for runnable jar