Forward port 3.0.7

Forward port changes in 3.0.7