Fix initial register bugs