Fixed double-registration bug.