frp: incorporate changes from Hesam.
frp: fix the timing issue.