Change code to ignore non-permission activity nodes