Fixes

Nothing controversial here. This should fix the crash encountered by @philostein.