Made it more robust.