Preventing some errors when running scripts.