prima: Reapply fixes after upgrade to 3.2.2.2

Change-Id: I9315c6a67312d4d43f92146262970b23d49b4824
(cherry picked from commit f85e35bb8a71a9e7b4d9951784988177381a7863)