fix register width in toplevel