Fixed PHP vars being deleted during wrap