Four carriages were derailed in the crash