ugh tracking down a nil pointer problem