Fixes

The first commit (crash) is important, and I'm not sure about the other - it fixes my problem, and apparently doesn't make other problems, but still I'm not sure about the consequences.