Forward port changes in 3.0.7

Forward port changes from 3.0.7 to develop