Fix memory leak on missing data