fixed parsing of several brackets