fix trim issue in extractOptions