Fixing some conversion issues

And other minor changes