rewrite remove-options to be a really reliable