Fixed a crashing script.