Fixed incorrect register behavior