Fix bug. Pass palette DOM element to PageFactory