This whole function seems bogus, I created #459 for that.