fixed bracket order parsing