Fix some errors when converting.