fix a bug on $ closing by )