Make sure that the wires are connected in the same way. If they have been done as standard they should be -

'B' wire - from external line = Orange* connects to No 5 terminal = Blue/white wire
'A' wire - from external line = White* connects to No 2 terminal = White/blue wire.

* If the main wire is twisted pair the colours will be the same as those connected to the numbered terminals.

If you are still not sure, post a photo of the inside of the junction box with the wires spread out.