fix marking behavior