remove last "</code>" instances