Closes #1280

I'll close #1280 after you merge this by hand. I forgot to include it in the commit message.