Fix rotation issue with dynamic table cells