updated handlers to the new permissions
fixed permission codes