int bnNew = 2*Current - Median - (Current - Median)*nTargetTimespan/nActualTimespan;
then if Median is equal to Current... then bnNew will be equal to Current no matter what nActualTimespan is. Even if nActualTimespan is close to zero the new complexity threshold will not be changed.
Maybe you just have found a vulnerability in Motocoin. To ensure that new blocks are mineable it will never make target time less than median and you found a way to exploit it.
Nice. There is a vulnerability in motocoin that can be exploited by a bot owner to easily make a blockchain fork. Anyway this is too risky to invest money in this coin unless they close the bug.