fix the railroad painting problem