fix registration api