Fixed markup logic error.
Production update with some overall fixes.