Try not to leak so much memory on failure