Making changes to support older php