Merge 4.1 Into Master

Includes fixes from #2984.