fixed the options handling