improved handling of extra options