fix issue with options being mutated