Fixing a bug: encoder was generating slopes in the beginning of the signal. The decoder can't handle this