improve prefix option parsing