Fix bug where it was not able to make registration api call