A few more fixes post-rewrite