Changed how corpse name generation works

This change helps getting Linux to work, but is probably bad code...