Merge "Fix three bugs in the handling of the advanced options activity" into nyc-dev