fix bug and add Listener in Layout index