Assorted stuff to hopefully fix it.