Fixed a logic error when clearing the next runtime marker