see #307 for why we do this this way