fix curve functions