Fix issues when target format name is empty