Fix app crash ermagerd.