made end stops more robust.