by entering a '*' into a code is like deleting the code. Now your system doesn't have a master code at all. You must temporarily make the installer code (default 9713) to be a master code as well. Then as you posted you can change the master code with *5 9713 01 XXXX #. To make the installer code a master code press :
* 8 9713 enter program mode
0 # enter the panel
43 # enter location 43
now you are at location 43,segment 1
press 4 to enable option 4
press * to save the edit
# to exit location 43
EXIT to exit the panel (address 0)
EXIT to exit the program mode
wait 12 seconds for the service display to turn off (restart period).
After that change the master code to a valid one and test it with *5 XXXX.
Then go through the above procedure again and disable Location 43, Segment 1, Option 4.