Fix a bug which misuse the hex as permission value.