Correction for railBorderYWidth calculation