Merge "Minor changes on top of memory leak fix ag/4607657"