Fixed scope issue so that multiple attributes can be bound