Fix switching between pixmap and bitmap pieces