fixing a right permission retrieval