fix compilation error by adding constraint to polyfun