Fix javascript error after click on permission row