Fixed duplicate registration bug.