Some really needed fixes