Changed global to globals as per #159