Error: Wrong bar state supplied to the drawing template!