fixed a NULL pointer problem?  hopefully?