Fix minor bugs

Remove correctly the cache of role when user edit it.

Check parameters before handling.