Fixes bug in saving registration info