fixes problem of borders doubling up