fixed redid script crashing the site