Odd error when running custom script