Fix some crashy bits