fixed a null pointer with viewing results