Fixed leak for Plugins