Remove trailing brackets