Fixing object to string conversion