Accounting for margins between cells fixes issues with borders dissapearing