Two minor bug fixes to sandbox scripts