Handle empty permissions; fix typo.