Fix LinearDecay and add test for it

Fixed bug in LinearDecay, added test.