Properly format source and target now they can be empty