Fix multiple rule handling