No longer required because the script has been changed to run onready