better handling for global marks