Fixed the instance name assignment issue