fix variable name in debug statements so they work