fixed crash at apps with no permissions