correct resizing of bars