Fix automarking