patch 3.1a   test patch

I have no idea what is happening. can't replicate the crashes so I'm
just shooting in the dark.