Fix instance id null issue