Two types of topological transitions in finite Majorana wires