fixed reapd from traversing garbage memory causing segfaults