Fix bug with closing brackets and whitespace offset