Endoding 1 - ext(p+1) and fixes.