Fixed a rest function that was causing problem in create permission screen.