prevent unallowed values from being set

limits mark_position to be only set as 'off', 'begin' or 'end'