Staging

Minor fixes plus upstream merge