Add correct calculations for rails on square doors