Fix diniz and some HLRule bug