Possible null pointer fix?