prima: patch wrong defined function