Merge "Plug leaks in transitions" into klp-dev