Arsenal boss Unai Emery admits he had planned to take off defender Ainsley Maitland-Niles before he was shown a second yellow card against Aston Villa.