Fix interface clearing code