parse objects correctly in options