Made attribute pointer optional when initializing bar.