fix palette and dual image mode