fix bug about prior