Fix segfaulting and list printing

Signed-off-by: Evan Anderson <evan@thelinuxman.us>