Try to clean up to avoid memory leaks