fixes for marking/demarking