fixed -1 to 1 slope bug