fix options handling