Make release method more robust.