adding fix for the "snail-trail" rendering bug.