Fixing the infinite print bug and working listtest.c