moved options clone inside of wrap function
removing changes that are not required to fix the bug