better handling of global options