Rail firms Northern and TransPennine Express have apologised