fix #388
change key oid to ref where it was forgotten