Fix horizontal segments inside grids