Fixes for 1.4

Fixes that are in 1.5 and master that need to be brought into 1.4.