Fixing the whole registering process