make sure cleanup deals with :locals