Fixed some issues with the conversion