fix compilation failure due to merging
fix crash due to a dangling pointer