Fixed unset perms_error var