bug fix for DrawMarkov function