Fixed bug when downloading rules from empty registry