Fixed incorrect variable use for setting handler by role