Preventing options leaking in loop