Fixed php references bug