Fixing border being off by one pixel in one of my calculations