bracket checking fixed (looks like)