Fixed bug in rule library. Updated stava library.