bug fix to markup generation