Fixed bug in rules export