Small crash fixes