Merge "Fix warnings (and a bug uncovered by warning)" into studio-1.3-dev