Fixed similar issue in permission listener