Fix #345 - fix some segfaults in yank and num.c