Fixed bug in bar-update code.