fix null pointer when trying to reload