Made the program compile, but still core dumps.