fix code errors regarding toolbar and mediabar