Railroad finally signs rail crossings pact as US funds were set to expire