Port 1.8 scripting changes to 1.7.10