cleans up leaking vars