bug fix in pirm