Fix multiple issues with the object converter and add test coverage