fixed curve shifting bug