Fixed slight bug in old script