rewrite options to dict parser, fixes #5032