Fix #9525

Haven't tested locally, so need to let Travis run. Should I add a test for this?