Fixed stuff that mysteriously broke during merging