Merge master branch issue fixes into WIP branch