Fix some issues from swift merge

/cc @rkoster