Jim - changed two NULLs to 0s to avoid warnings
example of using gdb to see memory error