fixed bug on bars creation