fix layout of borders