Fix: improper behaviour with not matching number of brackets