I am trying to create a demo program, but I keep uncovering more bugs.