fix pat hbug