Fixed stupid bug in the derivative. -.-