Fixed errors related to unclosed brackets