Fixed some bugs in markup