fixed '{', '(' and '[' corner cases