fixed issue with encrypted registration messages getting parsed incorrectly