Potential null pointer fix