fix marking/unmarking compacted
marcus' fixes