when the html modal was being created the scripts weren't being run correctly.