Fixed memory leak in MP1 UI capture patch
Some cleanup