fix segfault when calling oregister with only 1 param (from upstream)