Tweak to clear function