fixed bracket bugs