derivative bug fixed