Fix double border.right by turning one into border.top

The code was writing border.right twice, and border.top not at all.  This converts one of of the border.right instances with border.top