Merge changes from 3.0 branch