better global mark handling