Issue 401: fix ToParityEnum