Updated script for #1399