fixed bug with options object (should not change inside each loop)